<?php
// Step 2 of web-cp setup
//   Server Service configuration - e.g. FTP Server selection, Web Server selection

if ($data['httpserver'] == "") { $data['httpserver'] = $cfg['httpserver']; }
if ($data['ftpserver'] == "") { $data['ftpserver'] = $cfg['ftpserver']; }
if ($data['mailserver'] == "") { $data['mailserver'] = $cfg['mailserver']; }
if ($data['maillist'] == "") { $data['maillist'] = $cfg['maillist']; }
if ($data['dns_system'] == "") { $data['dns_system'] = $cfg['dns_system']; }
if ($data['dns2_system'] == "") { $data['dns2_system'] = $cfg['dns2_system']; }
if ($data['log_system'] == "") { $data['log_system'] = $cfg['log_system']; }
?>
<!--BEGIN HTML-->
<!--<input type=hidden name="step" value="2">-->
<input type=hidden name="data[serversselected]" value="true">
<!-- SERVER SELECTION CONFIGURATION -->
<div align="center">
<table border="0" cellpadding="0" cellspacing="0"><tr><td>
<table border="0" cellpadding="0" cellspacing="0" class="tblbg"><tr><td>
<table border="0" cellspacing="1" width="400">
	<tr>
		<td class="tbltop" colspan="5">Select Servers</td>
	</tr>
	<tr>
		<td class="row1" align="right"><B>Web Server</B>&nbsp;</td>
		<td class="row2" align="left">&nbsp;
		<select name="data[httpserver]">
			<option value="apache1" <?=($data['httpserver'] == "apache1") ? " selected" : "" ?>>Apache 1.x</option>
			<option value="apache2" <?=($data['httpserver'] == "apache2") ? " selected" : "" ?>>Apache 2.x</option>
		</select>
		</td>
	</tr>
	<tr>
		<td class="row1" align=right><B>FTP Server</B>&nbsp;</td>
		<td class="row2" align=left>&nbsp;
		<select name="data[ftpserver]">
			<option value="proftpd" <?=($data['ftpserver'] == "proftpd") ? " selected" : "" ?>>ProFTPd</option>
			<option value="pureftpd" <?=($data['ftpserver'] == "pureftpd") ? " selected" : "" ?>>PureFTPd</option>
			<option value="vsftpd" <?=($data['ftpserver'] == "vsftpd") ? " selected" : "" ?>>vsftpd</option>
			<option value="wuftpd" <?=($data['ftpserver'] == "wuftpd") ? " selected" : "" ?>>WU-FTPd</option>
			<option value="none" <?=($data['ftpserver'] == "none") ? " selected" : "" ?>>None</option>
		</select>
		</td>
	</tr>
	<tr>
		<td class="row1" align="right"><B>Mail Server</B>&nbsp;</td>
		<td class="row2" align="left">&nbsp;
		<select name="data[mailserver]">
			<option value="exim4" <?=($data['mailserver'] == "exim4") ? " selected" : "" ?>>Exim4</option>
			<option value="sendmail" <?=($data['mailserver'] == "sendmail") ? " selected" : "" ?>>Sendmail</option>
			<option value="qmail" <?=($data['mailserver'] == "qmail") ? " selected" : "" ?>>Qmail</option>
			<option value="virtualqmail" <?=($data['mailserver'] == "virtualqmail") ? " selected" : "" ?>>VirtualQmail</option>
			<option value="none" <?=($data['mailserver'] == "none") ? " selected" : "" ?>>None</option>
		</select>
		</td>
	</tr>
	<tr>
		<td class="row1" align=right><B>Mailing List</B>&nbsp;</td>
		<td class="row2" align=left>&nbsp;
		<select name="data[maillist]">
			<option value="mailman" <?=($data['maillist'] == "mailman") ? " selected" : "" ?>>MailMan</option>
			<option value="none" <?=($data['maillist'] == "none") ? " selected" : "" ?>>None</option>
		</select>
		</td>
	</tr>
	<tr>
		<td class="row1" align="right"><B>Primary DNS Server</B>&nbsp;</td>
		<td class="row2" align="left">&nbsp;
		<select name="data[dns_system]">
			<option value="bind" <?=($data['dns_system'] == "bind") ? " selected" : "" ?>>Bind</option>
			<option value="mydns" <?=($data['dns_system'] == "mydns") ? " selected" : "" ?>>MyDNS</option>
			<option value="pdns" <?=($data['dns_system'] == "pdns") ? " selected" : "" ?>>PDNS</option>
			<option value="tinydns" <?=($data['dns_system'] == "tinydns") ? " selected" : "" ?>>TinyDNS</option>
			<option value="none" <?=($data['dns_system'] == "none") ? " selected" : "" ?>>None</option>
		</select>
		</td>
	</tr>
	<tr>
		<td class="row1" align="right"><B>Secondary DNS Server</B>&nbsp;</td>
		<td class="row2" align="left">&nbsp;
		<select name="data[dns2_system]">
			<option value="webcp" <?=($data['dns2_system'] == "webcp") ? " selected" : "" ?>>web-cp</option>
			<option value="none" <?=($data['dns2_system'] == "none") ? " selected" : "" ?>>None</option>
		</select>
		</td>
	</tr>
	<tr>
		<td class="row1" align="right"><B>Database Log Level</B>&nbsp;</td>
		<td class="row2" align="left">&nbsp;
		<select name="data[dbloglevel]">
			<option value="0" <?=($data['dbloglevel'] == "0") ? " selected" : "" ?>>None</option>
			<option value="1" <?=($data['dbloglevel'] == "1") ? " selected" : "" ?>>Fatal Errors</option>
			<option value="2" <?=($data['dbloglevel'] == "2" || $data['dbloglevel'] == '') ? " selected" : "" ?>>Warnings</option>
			<option value="3" <?=($data['dbloglevel'] == "3") ? " selected" : "" ?>>All Activity</option>
		</select>
		</td>
	</tr>
	<tr>
		<td class="row1" align="right"><B>File Log Level</B>&nbsp;</td>
		<td class="row2" align="left">&nbsp;
		<select name="data[fileloglevel]">
			<option value="0" <?=($data['fileloglevel'] == "0" || $data['fileloglevel'] == '') ? " selected" : "" ?>>None</option>
			<option value="1" <?=($data['fileloglevel'] == "1") ? " selected" : "" ?>>Fatal Errors</option>
			<option value="2" <?=($data['fileloglevel'] == "2") ? " selected" : "" ?>>Warnings</option>
			<option value="3" <?=($data['fileloglevel'] == "3") ? " selected" : "" ?>>All Activity</option>
		</select>
		</td>
	</tr>
	<tr>
		<td class="row1" align="right"><B>Mail Log Level</B>&nbsp;</td>
		<td class="row2" align="left">&nbsp;
		<select name="data[mailloglevel]">
			<option value="0" <?=($data['mailloglevel'] == "0") ? " selected" : "" ?>>None</option>
			<option value="1" <?=($data['mailloglevel'] == "1" || $data['mailloglevel'] == '') ? " selected" : "" ?>>Fatal Errors</option>
			<option value="2" <?=($data['mailloglevel'] == "2") ? " selected" : "" ?>>Warnings</option>
			<option value="3" <?=($data['mailloglevel'] == "3") ? " selected" : "" ?>>All Activity</option>
		</select>
		</td>
	</tr>

</table>
</td></tr></table><br>
<input type=hidden name="data[serversselected]" value="true">
<!--END HTML-->
